function loginBack(data)
{
    if(data.success)
    {
        alert(data.msg);
        if(data.url)
        {
             window.location.href=data.url;
        }
        else
        {
            if(data.classify)
            {
                window.location.href="/student/admin/home/index";
            }
            else
            {
                window.location.href="/student/admin/home/index";
            }
        }
    }
    else
    {
        alert(data.msg);
    }
}
/**
 * 登陆验证
 * @return 回调函数
 */
function checkLogin()
{
    var data=$("#loginSubmit").serialize();
    var action=$("#loginSubmit").prop('action');
    $.post(action,data,loginBack,'json');
    return false;
};
//更新验证码
$(document).ready(function(){
    $('#codeIMG').click(function(){
        var src=$('#codeIMG').prop('src')+'?'+Math.random()*1000;
        $('#codeIMG').prop('src',src);
    });
});